<%@ page import="Sample.Student"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
	<%
	Student user = (Student) session.getValue("User");
	boolean isUserNull = false;

	if(user != null && user instanceof Student ){
		isUserNull = false;		
	}else{
		isUserNull = true;
	}
	
	                                             
%>

	<form action="StudentLoginForm.jsp">
		<center>
			<h1>Show Forward Data</h1>
		</center>
		<left>The information are below including form input and
		forward param.</left>
		<center>
			<table border="1" cellspacing="0">
				<thead>
					<tr>
						<th>Full Name</th>
						<th>Student ID</th>
						<th>Account Name</th>
						<th>Address</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<%
				if(!isUserNull){
					out.print(user.getName());
				}else{
					out.print("Error, user null");
				}	
				%>
						</td>
						<td>
							<%
				if(!isUserNull){
					out.print(user.getId());
				}else{
					out.print("Error, user null");
				}	
				%>
						</td>
						<td>I don't know</td>
						<td>I don't know</td>
					</tr>
				</tbody>
			</table>
		</center>

		<center>
			<input type="submit" value="Return">
		</center>



	</form>

</body>
</html>